<?php

namespace Shop\AdminBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Product
 *
 * @ORM\Table(name="product")
 * @ORM\Entity(repositoryClass="Shop\AdminBundle\Entity\ProductRepository")
 */
class Product
{
    /**
     * @var string
     *
     * @ORM\Column(name="name", type="string", length=40, nullable=false)
     */
    private $name;

    /**
     * @var string
     *
     * @ORM\Column(name="description", type="string", length=100, nullable=false)
     */
    private $description;

    /**
     * 现价
     * @var float
     *
     * @ORM\Column(name="price", type="float", precision=6, scale=2, nullable=false)
     */
    private $price;

    /**
     * 原价
     * @var float
     *
     * @ORM\Column(name="origin_price", type="float", precision=6, scale=2, nullable=false)
     */
    private $originPrice;

    /**
     * 折扣
     * @var float
     *
     * @ORM\Column(name="discount", type="float", precision=2, scale=1, nullable=false)
     */
    private $discount;

    /**
     * 商品详情
     * @var string
     *
     * @ORM\Column(name="detail", type="text", columnDefinition="text", nullable=false)
     */
    private $detail;

    /**
     * 购买详情
     * @var string
     *
     * @ORM\Column(name="buy_detail", type="text", columnDefinition="text", nullable=false)
     */
    private $buyDetail;

    /**
     * 商品有效期
     * @var string
     *
     * @ORM\Column(name="life_time", type="string", length=20, nullable=false)
     */
    private $lifeTime;

    /**
     * @var integer
     *
     * @ORM\Column(name="shop_id", type="integer", nullable=false)
     */
    private $shopId;

    /**
     * @var integer
     *
     * @ORM\Column(name="brand_id", type="integer", nullable=false)
     */
    private $brandId;

    /**
     * 已售数量
     * @var integer
     *
     * @ORM\Column(name="count_sold", type="integer", nullable=false)
     */
    private $countSold;

    /**
     * 库存量
     * @var integer
     *
     * @ORM\Column(name="count_all", type="integer", nullable=false)
     */
    private $countAll;

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var
     * @ORM\Column(type="smallint", columnDefinition="tinyint", nullable=false)
     */
    private $isDelete;

    /**
     *  一次最少购买数量
     * @var
     * @ORM\Column(type="integer", length=10, nullable=false)
     */
    private $minBuyCount;

    /**
     *  一次最多购买数量
     * @var
     * @ORM\Column(type="integer", length=10, nullable=false)
     */
    private $maxBuyCount;

    /**
     * 是否开启购物车
     * @var
     * @ORM\Column(type="smallint", columnDefinition="tinyint", nullable=false)
     */
    private $enableShopCart;

    /**
     * 下单时是否开启/关闭手机验证
     * @var
     * @ORM\Column(type="smallint", columnDefinition="tinyint", nullable=false)
     */
    private $enablePhoneVerify;



    /**
     * Set name
     *
     * @param string $name
     * @return Product
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return Product
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set price
     *
     * @param float $price
     * @return Product
     */
    public function setPrice($price)
    {
        $this->price = $price;

        return $this;
    }

    /**
     * Get price
     *
     * @return float 
     */
    public function getPrice()
    {
        return $this->price;
    }

    /**
     * Set detail
     *
     * @param string $detail
     * @return Product
     */
    public function setDetail($detail)
    {
        $this->detail = $detail;

        return $this;
    }

    /**
     * Get detail
     *
     * @return string 
     */
    public function getDetail()
    {
        return $this->detail;
    }

    /**
     * Set shopId
     *
     * @param integer $shopId
     * @return Product
     */
    public function setShopId($shopId)
    {
        $this->shopId = $shopId;

        return $this;
    }

    /**
     * Get shopId
     *
     * @return integer 
     */
    public function getShopId()
    {
        return $this->shopId;
    }

    /**
     * Set countSold
     *
     * @param integer $countSold
     * @return Product
     */
    public function setCountSold($countSold)
    {
        $this->countSold = $countSold;

        return $this;
    }

    /**
     * Get countSold
     *
     * @return integer 
     */
    public function getCountSold()
    {
        return $this->countSold;
    }

    /**
     * Set countAll
     *
     * @param integer $countAll
     * @return Product
     */
    public function setCountAll($countAll)
    {
        $this->countAll = $countAll;

        return $this;
    }

    /**
     * Get countAll
     *
     * @return integer 
     */
    public function getCountAll()
    {
        return $this->countAll;
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set isDelete
     *
     * @param integer $isDelete
     * @return Product
     */
    public function setIsDelete($isDelete)
    {
        $this->isDelete = $isDelete;

        return $this;
    }

    /**
     * Get isDelete
     *
     * @return integer 
     */
    public function getIsDelete()
    {
        return $this->isDelete;
    }

    /**
     * Set brandId
     *
     * @param integer $brandId
     * @return Product
     */
    public function setBrandId($brandId)
    {
        $this->brandId = $brandId;

        return $this;
    }

    /**
     * Get brandId
     *
     * @return integer 
     */
    public function getBrandId()
    {
        return $this->brandId;
    }

    /**
     * Set originPrice
     *
     * @param float $originPrice
     * @return Product
     */
    public function setOriginPrice($originPrice)
    {
        $this->originPrice = $originPrice;

        return $this;
    }

    /**
     * Get originPrice
     *
     * @return float 
     */
    public function getOriginPrice()
    {
        return $this->originPrice;
    }

    /**
     * Set discount
     *
     * @param float $discount
     * @return Product
     */
    public function setDiscount($discount)
    {
        $this->discount = $discount;

        return $this;
    }

    /**
     * Get discount
     *
     * @return float 
     */
    public function getDiscount()
    {
        return $this->discount;
    }

    /**
     * Set buyDetail
     *
     * @param string $buyDetail
     * @return Product
     */
    public function setBuyDetail($buyDetail)
    {
        $this->buyDetail = $buyDetail;

        return $this;
    }

    /**
     * Get buyDetail
     *
     * @return string 
     */
    public function getBuyDetail()
    {
        return $this->buyDetail;
    }

    /**
     * Set lifeTime
     *
     * @param string $lifeTime
     * @return Product
     */
    public function setLifeTime($lifeTime)
    {
        $this->lifeTime = $lifeTime;

        return $this;
    }

    /**
     * Get lifeTime
     *
     * @return string 
     */
    public function getLifeTime()
    {
        return $this->lifeTime;
    }

    /**
     * Set minBuyCount
     *
     * @param integer $minBuyCount
     * @return Product
     */
    public function setMinBuyCount($minBuyCount)
    {
        $this->minBuyCount = $minBuyCount;

        return $this;
    }

    /**
     * Get minBuyCount
     *
     * @return integer 
     */
    public function getMinBuyCount()
    {
        return $this->minBuyCount;
    }

    /**
     * Set maxBuyCount
     *
     * @param integer $maxBuyCount
     * @return Product
     */
    public function setMaxBuyCount($maxBuyCount)
    {
        $this->maxBuyCount = $maxBuyCount;

        return $this;
    }

    /**
     * Get maxBuyCount
     *
     * @return integer 
     */
    public function getMaxBuyCount()
    {
        return $this->maxBuyCount;
    }

    /**
     * Set enableShopCart
     *
     * @param integer $enableShopCart
     * @return Product
     */
    public function setEnableShopCart($enableShopCart)
    {
        $this->enableShopCart = $enableShopCart;

        return $this;
    }

    /**
     * Get enableShopCart
     *
     * @return integer 
     */
    public function getEnableShopCart()
    {
        return $this->enableShopCart;
    }

    /**
     * Set enablePhoneVerify
     *
     * @param integer $enablePhoneVerify
     * @return Product
     */
    public function setEnablePhoneVerify($enablePhoneVerify)
    {
        $this->enablePhoneVerify = $enablePhoneVerify;

        return $this;
    }

    /**
     * Get enablePhoneVerify
     *
     * @return integer 
     */
    public function getEnablePhoneVerify()
    {
        return $this->enablePhoneVerify;
    }
}
